package com.jrfid.smartcabinet.demo.ui.take_result

import androidx.lifecycle.ViewModelProvider
import android.os.Bundle
import androidx.fragment.app.Fragment
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.navigation.fragment.navArgs
import com.jrfid.smartcabinet.demo.R
import com.jrfid.smartcabinet.demo.base.BaseFragment
import com.jrfid.smartcabinet.demo.databinding.TakeResultFragmentBinding
import com.jrfid.smartcabinet.demo.ui.taking.TakingFragmentArgs

class TakeResultFragment : BaseFragment<TakeResultFragmentBinding, TakeResultViewModel>(TakeResultViewModel::class.java) {

    companion object {
        fun newInstance() = TakeResultFragment()
    }

    override fun getLayoutId(): Int = R.layout.take_result_fragment

    private val args by navArgs<TakeResultFragmentArgs>()

    override fun setData() {
        val isTake = args.isTake
        val tagInfoArray = args.tagInfoArray
        val cabinetArray = args.cabinetArray
        getViewModel()?.setData(isTake, tagInfoArray, cabinetArray)
    }

}